import { dispatchOrderEmp } from '@/api/order'
import { ref } from 'vue'

const useCustomerServiceForm = () => {
  const submitLoading = ref(false)

  const submit = async (orderIds: Array<string>, empId: string) => {
    submitLoading.value = true
    const res = await dispatchOrderEmp(orderIds, empId)
    submitLoading.value = false
    return res.data
  }

  return {
    submitLoading,
    submit,
  }
}

export default useCustomerServiceForm
